package test.db.table.mysql.type;

import test.db.table.Table;

/**
 * @author newbie
 * @since 0.1
 */
public enum PwBbsStarTable implements Table, ColumnType {
    BBS_NO(Column.bbsNo),
    REGIST_TIMESTAMP(Column.registTimestamp),
    USER_SID(Column.userSid),
    USER_IP(Column.userIp),
    POINT(Column.point);
    
    private final Column column;
    private static final String TYPE_POINT = "INT(5)";

    PwBbsStarTable(Column column) {
        this.column = column;
    }
    
    private enum Column {
        bbsNo {
            String getType() {
                return TYPE_BBS_NO;
            }
        },
        
        registTimestamp {
            String getType() {
                return TYPE_REGIST_TIMESTAMP;
            }
        },
        
        userSid {
            String getType() {
                return TYPE_USER_SID;
            }
        },
        
        userIp {
            String getType() {
                return TYPE_USER_IP;
            }
        },
        
        point {
            String getType() {
                return TYPE_POINT;
            }
        };
        
        abstract String getType();
    }
    
    public String getType() {
        return column.getType();
    }
    
    public void initData() throws Exception {
    }
}